﻿using System;
using System.Web.Routing;
using Basmus.Resources;
using Basmus.Values.Web;
using Basmus.Web.Topology;

namespace ExampleWebApplication
{
    public class Global : System.Web.HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            NamespaceMap.Map.Add("ExampleWebApplication.Models", "~");

            var topology = TopologyHelper.CreateTopology()
                .Add("localhost",
                     domain => domain
                                   .Add("/", false,
                                        app => app
                                                   .Add<Models.CosmicBodyList>()
                                                   .Add<Models.Default>()
                                                   .Add<Models.Test>()
                                   )
                                   /*.Add("/files/", false,
                                        app => app
                                                   .Add<Models.Default>()
                                                   .Add<Models.Test>())*/);
            LinkUtil.WebLinkService.LoadTopology(topology);
            //WebLinkService.Default.LoadTopology(topology);
        }
    }
}